//
//  HAJSBridgeHandlerEvent.h
//  HAFund
//
//  Created by 夏成龙 on 2018/11/12.
//  Copyright © 2018年 夏成龙. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HAJSBridgeHandler.h"
#import "JSBridgeHandlerProtocol.h"

NS_ASSUME_NONNULL_BEGIN

@class HAJSBridgeHandlerEvent;

@interface HAJSEvent : NSObject

/// 交互方法名称
@property (copy, nonatomic) NSString *methodName;
/// 回调函数
@property (copy, nonatomic) NSString *callBackName;
/// 交互参数
@property (copy, nonatomic) NSString *params;
/// 交互时间戳
@property (assign, nonatomic) long long timestamp;

/// 事件接受者
@property (weak, nonatomic) HAJSBridgeHandler *handler;
/// 事件分发者
@property (weak, nonatomic) HAJSBridgeHandlerEvent *handlerEvent;
/// 事件代理响应者
@property (weak, nonatomic) id <JSBridgeHandlerProtocol> bridgeHandler;

- (instancetype)initWithEventParmas:(NSDictionary *)eventParmas;

@end

@interface HAJSBridgeHandlerEvent : NSObject

/// 交互响应方法
- (void)bridgeResponseEvnetWithEvnet:(HAJSEvent *)event;
/// 回调方法
- (void)callBackFunctionWithEvnet:(HAJSEvent *)event params:(NSDictionary *)params;

@end

NS_ASSUME_NONNULL_END
